<?php
App::uses('AppModel', 'Model');
/**
 * DisciplinesTeacher Model
 *
 * @property Teacher $Teacher
 * @property Discipline $Discipline
 */
class Distribution extends AppModel {

	
	public function validateUnique($year){
		$count = $this->find('count', array('conditions' => array('Distribution.year' => $year, 'Distribution.name' => 'Versão 1')));

		return ($count['Distribution']['count'])?false:true;
	}


}
